# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.contrib import admin
from django.contrib.auth.admin import UserAdmin

# Register your models here.
from  .models import  UserInfo,UserGroup,master_config,HostInfo,HostPermission,Student

class master_configAdmin(admin.ModelAdmin):
    list_display = ('id', 'cluster_name', 'master_host', 'master_port', 'master_user', 'master_password', 'create_time', 'update_time')
    search_fields = ['id', 'cluster_name', 'master_host', 'master_port', 'master_user', 'master_password', 'create_time', 'update_time']




# class usersAdmin(UserAdmin):
#     def __init__(self, *args, **kwargs):
#         super(usersAdmin, self).__init__(*args, **kwargs)
#         self.list_display = ('id', 'username', 'display', 'role', 'email', 'password', 'is_superuser', 'is_staff')
#         self.search_fields = ('id', 'username', 'display', 'role', 'email')
#         self.form = usersChangeForm
#         self.add_form = usersCreationForm

admin.site.site_header='冰与火之歌'
admin.site.site_title='路飞桑'


# admin.site.register(users,UserAdmin)
admin.site.register(master_config,master_configAdmin)
admin.site.register([UserInfo, UserGroup,HostInfo,HostPermission,Student])



